<?php

declare(strict_types=1);

namespace app\admin\controller;

use app\admin\lib\Layui;
use app\admin\logic\User as LogicUser;

/**
 * 用户相关
 */
class User extends Base
{
    /**
     * 数据表格
     *
     * @param integer $page
     * @param integer $limit
     */
    public function data(int $page = 1, int $limit = 10)
    {
        $where = request()->only(['id', 'nickname', 'sex'], 'get');
        $data = LogicUser::getLists($where, $page, $limit);
        return Layui::table('用户列表', ...array_values($data));
    }
}
